Save the contents of the window.